From c5fb599fa1be4b9a645e86d7129f30f84d139d5e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 26 May 1993 18:00:55 +0000 Subject: [PATCH] (mail-strip-quoted-names): Catch errors from forward-sexp. --- lisp/mail/mail-utils.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 63757511013..0d32fbe23fe 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -75,7 +75,11 @@ Return a modified address list." (forward-char -1) (skip-chars-backward " \t") (delete-region (point) - (save-excursion (forward-sexp 1) (point)))) + (save-excursion + (condition-case () + (forward-sexp 1) + (error (goto-char (point-max)))) + (point)))) (setq address (buffer-string)) (erase-buffer)) ;; Strip non-nested comments an easier way. -- 2.30.2